home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Ultimate Frank Lloyd…ght - America's Architect
/
Ultimate Frank Lloyd Wright, The - America's Architect (1994)(Microsoft Home).iso
/
pre
/
flw
/
flwli.dir
/
00071_Script_71
< prev
next >
Wrap
Text File
|
1994-11-15
|
16KB
|
564 lines
--library movie for Frank Lloyd Project
--by Hamid Younessi August 94
------------ S T A R T M O V I E ------------------------------
on startMovie
cursor 4
Global LObj
Global PageNum
Global BookNum
Global lastText, HiLiteSprite
Global FindNum
Global HiLi
Global nowframe
Global SeeAlsoNess
set SeeAlsoNess = FALSE
set FindNum=1
set HiLi = -10000
set HiLiteSprite = 7
set BoxNum = 0
set the puppet of Sprite 3 to TRUE
-- set the puppet of Sprite 7 to TRUE
set the puppet of Sprite 8 to TRUE
set the puppet of Sprite 9 to TRUE
set the puppet of Sprite 10 to TRUE
set the puppet of Sprite 11 to TRUE
set the puppet of Sprite 12 to TRUE
set the puppet of Sprite 14 to TRUE
set the puppet of Sprite 15 to TRUE
set the puppet of Sprite 16 to TRUE
set the puppet of Sprite 17 to TRUE
set the puppet of Sprite HiLiteSprite to TRUE
-- put " " into field A35
put "" into field "searchBox"
put the text of field "searchBox" into LastText
-- put " " into field A16
-- -- set the textFont of field A35 to "Times"
-- set the textFont of field A11 to "Times"
-- set the textSize of field A11 to 14
--
-- set the textFont of field A16 to "Times"
-- set the textSize of field A16 to 12
-- set the textHeight of field A16 to 14
-- -- set the textSize of field A35 to 12
-- set the textFont of field A47 to "Times"
set the textHeight of field A47 to 15
-- set the textSize of field A47 to 10
openXLib "FLWLib" -- opens FLWLib.DLL
if ObjectP(LObj) then LObj(mDispose)
set LOBJ = FLWLib(mNew)
set dummy = " "
-- LObj(minitialize, dummy)
set PageNum=0
puppetSprite 21, TRUE
puppetSprite 22, TRUE
puppetSprite 23, TRUE
set the immediate of sprite 23 to TRUE
set the stretch of sprite 23 to FALSE
-- set the ink of sprite 23 to 8
set the immediate of sprite 5 to TRUE
set the immediate of sprite 6 to TRUE
--copy the first five indexes here
put "Aalto, Alvar" into field "Ibox1"
put "Abercrombie and Fitch (New York)" into field "Ibox2"
put "Abstraction" into field "Ibox3"
put "Abstraction: definition of" into field "Ibox4"
put "Academic revival" into field "Ibox5"
-- GetIndexes --get indexes
set nowFrame = "limai000000n°°"
set the keydownscript to "if the key = ENTER or the key = RETURN then dontpassevent"
cursor -1
end startMovie
-----------------------------------------------------------------------
on CheckForEntry
global HiLi
global lastText
global HiLiteSprite
set HiLi = -10000
set the CastNum of Sprite HiLiteSprite to the number of Cast "UnHilite"
put " " into line 1 of field A47
put " " into line 3 of field A47
GetIndexes
set lastText = the text of cast "SearchBox"
end CheckForEntry
-------------------S T O P M O V I E ---------------------------------
on stopMovie
Global LObj
set dummy = " "
LObj(mend, dummy)
LObj(mDispose)
CloseXLib"FLWLib"
end stopMovie
------------------------------------------------------------------------
------------------- B U T T O N S T A T E ----------------------------
on buttonState
global FrankNav, bFlag,hili
if hili <> -10000 then
if rollover(16) then
set the forecolor of sprite 17 to 255
puppetSprite 17,FALSE
puppetSprite 16,TRUE
set the forecolor of sprite 16 to 230
updateStage
else if rollover(17) then
set the forecolor of sprite 16 to 255
puppetSprite 16,FALSE
puppetSprite 17,TRUE
set the forecolor of sprite 17 to 230
updateStage
else
set the forecolor of sprite 16 to 255
set the forecolor of sprite 17 to 255
puppetSprite 16,FALSE
puppetSprite 17,FALSE
end if
end if
if rollover(5) then
puppetSprite 6,FALSE
puppetSprite 5,TRUE
set the castNum of sprite 5 to B12
updateStage
else if rollover(6) then
puppetSprite 5,FALSE
puppetSprite 6,TRUE
set the castNum of sprite 6 to B15
updateStage
else
set the castNum of sprite 5 to B11
set the castNum of sprite 6 to B14
puppetSprite 5,FALSE
puppetSprite 6,FALSE
end if
if rollover(18) then
puppetSprite 19, FALSE
puppetSprite 18, TRUE
set the castNum of sprite 18 to A62
updateStage
else if rollover(19) then
puppetSprite 18, FALSE
puppetSprite 19, TRUE
set the castNum of sprite 19 to A63
updateStage
else
set the castNum of sprite 18 to A58
set the castNum of sprite 19 to A61
puppetSprite 18, FALSE
puppetSprite 19, FALSE
end if
if (the mouseV > 200) or ( bFlag = TRUE) then
doState
end if
end buttonState
-------------------------------------------------------------------------
------------------- S A V E L O C A L S ------------------------------
on saveLocals
global nowFrame, lastMovie, lastFrame
set lastFrame = "limai000000n°°"
set lastMovie = "FLWLI"
end saveLocals
-------------------------------------------------------------------------
------------------- F I N D N E X T -----------------------------------
on FindNext
Global fFIND
Global SearchString
put fFIND
Global PageNum
set PageNum = 0
if fFIND = 1 then
set fFIND = 0
set the castNum of sprite 3 to A14
UpdateStage
end if
if fFIND = 0 then
set fFIND = 1
set the castNum of sprite 3 to A15
UpdateStage
end if
end FindNext
------------------------------------------------------------------------
---------------------G E T I N D E X E S -----------------------------
on GetIndexes -- gets the five indexes after bp
Global Index1, Index2, Index3, Index4, Index5
Global SearchString
Global LObj
Global FindNum
Global PageNum
set PageNum = 0
set FindNum=1
----------------------------------------
-- with every key stroke set the text
-- user just entered to SearchString
----------------------------------------
put the text of cast "SearchBox" into searchstring
set Index1 = ""
set Index2 = ""
set Index3 = ""
set Index4 = ""
set Index5 = ""
set the text of cast "PageText" to ""
set dummy =" "
----------------------------------------
-- go to DLL and set Index 1 through 5
----------------------------------------
LObj(mGetIndex, SearchString) -- method that finds index and sets Index1 thru Index5
-----------------------------------------
-- set the text of the IBoxes
-----------------------------------------
set the text of cast "IBox1" to Index1
set the text of cast "IBox2" to Index2
set the text of cast "IBox3" to Index3
set the text of cast "IBox4" to Index4
set the text of cast "IBox5" to Index5
updatestage
end GetIndexes
-------------------------------------------------------------------------
------------------G E T T E X T ---------------------------------------
on GetText -- gets a page text for the bottom of the screen
Global FindNum, SearchText -- passed to mGetText
Global boxNum -- lingo to keep track of box number
Global ShowText -- Page of text
Global LObj
Global PageNum
Global BookNum
Global HitNum
Global TotHit
Global err_check
Global nowFrame
Global HiLiStat
global first_time
set ShowText = " "
set SearchText to the text of cast ("IBox" & string(boxNum))
set dummy= " "
set err_check = LObj(mGetText, SearchText, FindNum, PageNum)
if (err_check <> -15000) then
set BookNum = LObj(mGetBookNum, dummy)
set HitNum = LObj (mGetHitNum, dummy)
set TotHit = LObj (mGetTotHitNum, dummy)
if booknum = 1 then
set the castnum of sprite 14 to the number of cast "book1"
else if booknum = 2 then
set the castnum of sprite 14 to the number of cast "book2"
else if booknum = 3 then
set the castnum of sprite 14 to the number of cast "book3"
else if booknum = 4 then
set the castnum of sprite 14 to the number of cast "book4"
else if booknum = 5 then
set the castnum of sprite 14 to the number of cast "book5"
else if booknum = 6 then
set the castnum of sprite 14 to the number of cast "book6"
else if booknum = 7 then
set the castnum of sprite 14 to the number of cast "book7"
end if
put HitNum into line 1 of field A47
put TotHit into line 3 of field A47
if TotHit <> 1 then
set nowFrame = "limai000000°°°"
else
set nowFrame = "limai000000n°°"
end if
set the text of cast "PageText" to ShowText
if (PageNum <> 0) then
set HiLiStat = LObj (mGetHiLiStat, dummy)
if (HiLiStat <> -1) then
HiLine1
end if
else HiLine
end if
UpdateStage
end GetText
------------------------------------------------------------------------
------------------------G E T N E X T --------------------------------
-- this functions is used by next and previous buttons on the bottom
-- of the screen that go to next of previous occurance of a word
on GetNext -- when clicked on get next next button
Global FindNum, SearchText -- passed to mGetText
Global boxNum -- lingo to keep track of box number
Global ShowText -- Page of text
Global LObj
Global PageNum
Global BookNum
set PageNum=0
set SearchText to the text of cast ("IBox" & string(boxNum))
set dummy = " "
set FindNum = LObj(mGetText, SearchText, FindNum, PageNum)
set BookNum = LObj(mGetBookNum, dummy)
set HitNum = LObj (mGetHitNum, dummy)
set TotHit = LObj (mGetTotHitNum, dummy)
if booknum = 1 then
set the castnum of sprite 14 to the number of cast "book1"
else if booknum = 2 then
set the castnum of sprite 14 to the number of cast "book2"
else if booknum = 3 then
set the castnum of sprite 14 to the number of cast "book3"
else if booknum = 4 then
set the castnum of sprite 14 to the number of cast "book4"
else if booknum = 5 then
set the castnum of sprite 14 to the number of cast "book5"
else if booknum = 6 then
set the castnum of sprite 14 to the number of cast "book6"
else if booknum = 7 then
set the castnum of sprite 14 to the number of cast "book7"
end if
put HitNum into line 1 of field A47
put TotHit into line 3 of field A47
if TotHit <> 1 then
set nowFrame = "limai000000°°°"
else
set nowFrame = "limai000000n°°"
end if
set the text of cast "PageText" to ShowText
HiLine
UpdateStage
end GetNext
------------------------------------------------------------------------
-------------------A R R O W D O W N ---------------------------------
on ArrowDown -- when the arrow down button is pressed
Global Index1, Index2, Index3, Index4, Index5
Global SearchString
Global LObj
Global FindNum
Global BoxNum
Global HiLi
Global HiLiteSprite
set testindex = the text of cast "Ibox1"
set dummy = " "
set FindNum=1
----------------------------------------
-- with every key stroke set the text
-- user just entered to SearchString
----------------------------------------
set SearchString = the text of cast "Ibox2"
--the next lines gets the next five indexes
if (chars(SearchString,1,1) <> "") then
LObj(mGetIndex, SearchString) -- method that finds index and sets Index1 thru Index5
put the number of chars in testindex into maxlen
if HiLi <> -10000 and chars(testindex,1,maxlen) <> string (index1) then
set HiLi = HiLi - 1
if HiLi = 0 then --unhilite
set the CastNum of Sprite HiLiteSprite to the number of Cast "UnHilite"
else if HiLi <= 5 and HILI >= 1 then
set the CastNum of Sprite HiLiteSprite to the number of cast "HiLite"
set the LocV of Sprite HiLiteSprite to the locV of Sprite (7+HiLi)
end if
end if
-----------------------------------------
-- set the text of the IBoxes
-----------------------------------------
set the text of cast "IBox1" to Index1
set the text of cast "IBox2" to Index2
set the text of cast "IBox3" to Index3
set the text of cast "IBox4" to Index4
set the text of cast "IBox5" to Index5
updatestage
end if
end ArrowDown
-------------------------------------------------------------------------
----------------- A R R O W U P ---------------------------------------
on ArrowUp --when arrow up button is pressed
Global Index1, Index2, Index3, Index4, Index5
Global SearchString
Global LObj
Global FindNum
Global HiLi
Global HiLiteSprite
set testindex = the text of cast "Ibox1"
set dummy = " "
set FindNum=1
----------------------------------------
-- with every key stroke set the text
-- user just entered to SearchString
----------------------------------------
set SearchString = the text of cast "Ibox1"
set Index1 = ""
set Index2 = ""
set Index3 = ""
set Index4 = ""
set Index5 = ""
----------------------------------------
-- go to DLL and set Index 1 through 5
LObj(mGetPrevIndex, SearchString) -- method that finds index and sets Index1 thru Index5
put the number of chars in testindex into maxlen
if HiLi <> -10000 and chars(testindex,1,maxlen) <> string (index1) then
set HiLi = HiLi + 1
if HiLi = 6 then --unhilite
set the CastNum of Sprite HiLiteSprite to the number of cast "UnHilite"
else if HiLi >=1 and HiLi <=5 then
set the CastNum of Sprite HiLiteSprite to the number of cast "HiLite"
set the LocV of Sprite 7 to the locV of Sprite (7+HiLi)
end if
end if
-----------------------------------------
-- set the text of the IBoxes
-----------------------------------------
set the text of cast "IBox1" to Index1
set the text of cast "IBox2" to Index2
set the text of cast "IBox3" to Index3
set the text of cast "IBox4" to Index4
set the text of cast "IBox5" to Index5
updatestage
end ArrowUp
-----------------------------------------------------------------------
--------------- H I T W O R D ---------------------------------------
on hitWord lnNUm
hilite line lnNum of field A46
end hitWord
-----------------------------------------------------------------------
--------------- L I F O R S T E P -------------------------------------
on liForStep
global FindNum
global HiLi
if HiLi <> -10000 then
set FindNum = FindNum + 1
GetNext
end if
end liForStep
-----------------------------------------------------------------------
--------------- L I B A C K S T E P -----------------------------------
on liBackStep
Global FindNum
Global HiLi
if HiLi <> -10000 then
-- if FindNum > 0 then
set FindNum = FindNum -1
-- end if
GetNext
end if
end liBackStep
------------------------------------------------------------------------
----------------I N I T P R E V I N D E X ---------------------------
on init_prev_offset
set dummy = " "
-- LObj(minit_prev_offset, dummy) --reinitializes the prev_offset
end init_prev_offset
------------------------------------------------------------------------
------------------------------------------------------------------------
----------------H I L I ---------------------------
on HiLine
global line_num
global hiLineNum
global LObj
set dummy = " "
set line_num = LObj(mGetLineNum, dummy)
hilite line line_num of field "Pagetext"
updatestage
end HiLine
----------------H I L I 1--------------------------
on HiLine1
global HiLiStat
hilite line HiLiStat of field "Pagetext"
updatestage
end HiLine1